var mongoose = require("../db.js");
var schema = mongoose.Schema; //模型生成器(表生成器)
//建立表 并且指定字段
var userSchema = new schema({
    username: { type: String, unique: true }, // 表示唯一键,
    password: String,
    type: String,
    state: Boolean, //启用：true,禁用：false
    email: String,
    phone: Number,
    createtime: String,
    avatar: String,
});

//转成数据模型导出
module.exports = mongoose.model("userinfo", userSchema);
